package com.qingke.action;

import com.opensymphony.xwork2.ActionSupport;

public class SomeAction extends ActionSupport {
	private String name;
	private String password;
	private String message;
	
	@Override
	public String execute() throws Exception {
		message="logon is good";
		return SUCCESS;
	}
	
	@Override
	public void validate() {
		super.validate();
		if(!"admin".equals(name)){
			this.addFieldError("name","name is wrong");
		}
		if(!"admin".equals(password)){
			this.addFieldError("password","password is wrong");
		}
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public String getMessage() {
		return message;
	}

	public void setMessage(String message) {
		this.message = message;
	}
	
	
}
